<template>
    <p v-fontSize="fontSize">组件</p>
    <button @click="fontSize='24px'">更改字体大小</button>
</template>

<script setup>
import {ref} from 'vue'
const fontSize=ref('12px')
// const vFontSize =(el,binding)=>el.style.fontSize = binding.value
</script>